0
沈泽
2021-10-22 f7c4ceeb654db44722c9362af3e9b70c9d231a3d
0
5个文件已修改
168 ■■■■ 已修改文件
WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldRepairChangeBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSc_MouldRepairChangeBill.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsSc_MouldRepairChangeBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -27,20 +27,19 @@
        /// </summary>
        [Route("Cg_POOrderBill/list")]
        [HttpGet]
        public object list(string sWhere)
        public object list(string sWhere, string user)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                //判断是否有采购经理权限
                bool isCgjl = Security_Log("Cg_POOrderBill_PurchasManager", 1, true, user);
                if (!isCgjl)
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_POOrderBillList " + sWhere, "h_v_IF_POOrderBillList");
                    sWhere += " and HEmpID in (select HEmpID from Gy_Czygl where Czymc='Admin' )";
                }
                else
                {
                    string sql1 = "select * from h_v_IF_POOrderBillList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
                }
                string sql = "select * from h_v_IF_POOrderBillList where 1 = 1 " + sWhere;
                ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
@@ -144,6 +143,116 @@
            }
        }
        //判断是否存在权限,并写入日志
        public static bool Security_Log(string gnsy, int LogTF, bool Msg, string CurUserName)
        {
            //gnsy 功能索引,模块
            //usercode 当前用户代码
            //LogTF 1判断权限并写日志,2只写日志,3只判断权限
            //Msg 没有权限时 是否提示框
            string UserID = CurUserName;
            try
            {
                ClsSqlHelper oCn = new ClsSqlHelper();
                DataSet Ds = new DataSet();
                DataSet DsUser = new DataSet();
                DataSet DsJS = new DataSet();//角色
                long ModID = 0;
                bool HavRight = false;
                //找到模块权限
                Ds = oCn.RunProcReturn("select * from xt_xtgnb where gnsy='" + gnsy.Trim() + "'", "xt_xtgnb");
                if (Ds.Tables[0].Rows.Count == 0)
                {
                    if (Msg == true)
                    {
                        //MessageBox.Show("没有找到该功能模块!", "提示");
                    }
                    return false;
                }
                else
                {
                    ModID = ClsPub.isLong(Ds.Tables[0].Rows[0]["ID"].ToString());  //返回模块
                }
                if (LogTF == 1 || LogTF == 3)//需要判断权限
                {
                    //根据用户名称判断权限
                    DsUser = oCn.RunProcReturn("select * from gy_czygl where czymc='" + UserID.Trim() + "'", "gy_czygl");
                    if (DsUser.Tables[0].Rows.Count == 0)
                    {
                        if (Msg == true)
                        {
                            //MessageBox.Show("没有找到当前操作员!", "提示");
                        }
                        return false;
                    }
                    //根据用户名称判断权限
                    if ((bool)DsUser.Tables[0].Rows[0]["ManagerFlag"])  //是否管理员
                    {
                        HavRight = true;
                    }
                    else
                    {
                        if (DsUser.Tables[0].Rows[0]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1")
                        {
                            HavRight = true;
                        }
                        else
                        {
                            //获取用户组  并循环判断权限
                            //判断角色是否有权限
                            DsJS = oCn.RunProcReturn("select isnull(AuthorityID,'') AuthorityID from System_UserGroupinfo a inner join System_UserGroup b on a.GroupID=b.GroupID " +
                                " Where a.USERID='" + UserID.Trim() + "'", "gy_czygl");
                            if (DsJS == null)
                            {
                                HavRight = false;
                            }
                            else
                            {
                                HavRight = false;
                                for (int i = 0; i < DsJS.Tables[0].Rows.Count; i++)
                                {
                                    if (ClsPub.isStrNull(DsJS.Tables[0].Rows[i]["AuthorityID"]).Length > ModID)
                                    {
                                        if (DsJS.Tables[0].Rows[i]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1")
                                        {
                                            HavRight = true;
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    if (HavRight == false)
                    {
                        if (Msg == true)
                        {
                            //MessageBox.Show("您没有权限,请与管理员联系!", "提示");
                        }
                    }
                }
                //需要写入日志
                if ((LogTF == 1 && HavRight) || LogTF == 2)
                {
                    //Add_Log(Ds.Tables[0].Rows[0]["id"].ToString().Trim(), gnsy + "," + Ds.Tables[0].Rows[0]["gnmc"].ToString().Trim(), CurUserName);
                }
                return HavRight;
            }
            catch (Exception e)
            {
                if (Msg == true)
                {
                    //MessageBox.Show("判断权限时发现错误,请与管理员联系!", "提示");
                }
                return false;
            }
        }
        //
    }
}
WebAPI/Controllers/MJGL/Sc_MouldRepairChangeBillController.cs
@@ -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/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" +
                "HNewMaterID,HNewName,HNewModel,HNewModel2,HExplanation,HRepairContent,HRemark,HChangeType" +
                ") " +
                " 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,6 +28,7 @@
        public string HNewBarCode;        /*--改制后新条码*/
        public string HNewDesignLife;       /*--新设计寿命*/
        public string HExplanation;           /* --改制要求*/
        public string HChangeType;         /* --改型类型*/
        public string HRemark;         /* --备注*/
        public string HInnerBillNo;        /* --内部单据号*/
    }
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -18,25 +18,25 @@
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>10/22/2021 13:46:33</publishTime>
      <publishTime>10/22/2021 15:00:35</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>10/22/2021 13:46:33</publishTime>
      <publishTime>10/22/2021 15:00:35</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>10/22/2021 13:46:28</publishTime>
      <publishTime>10/22/2021 15:00:33</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>10/22/2021 13:46:28</publishTime>
      <publishTime>10/22/2021 15:00:33</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>10/22/2021 13:46:19</publishTime>
      <publishTime>10/22/2021 15:00:29</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>10/22/2021 13:46:19</publishTime>
      <publishTime>10/22/2021 15:00:29</publishTime>
    </File>
    <File Include="bin/Interop.gregn6Lib.dll">
      <publishTime>08/25/2021 10:28:25</publishTime>
@@ -60,10 +60,10 @@
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>10/22/2021 13:46:21</publishTime>
      <publishTime>10/22/2021 15:00:30</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>10/22/2021 13:46:21</publishTime>
      <publishTime>10/22/2021 15:00:30</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>08/09/2021 15:55:25</publishTime>
@@ -72,22 +72,22 @@
      <publishTime>08/04/2014 04:33:56</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>10/22/2021 13:46:15</publishTime>
      <publishTime>10/22/2021 15:00:27</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>10/22/2021 13:46:15</publishTime>
      <publishTime>10/22/2021 15:00:27</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>10/22/2021 13:46:17</publishTime>
      <publishTime>10/22/2021 15:00:28</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>10/22/2021 13:46:17</publishTime>
      <publishTime>10/22/2021 15:00:28</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>10/22/2021 13:46:17</publishTime>
      <publishTime>10/22/2021 15:00:29</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>10/22/2021 13:46:17</publishTime>
      <publishTime>10/22/2021 15:00:29</publishTime>
    </File>
    <File Include="bin/stdole.dll">
      <publishTime>05/09/2021 13:35:37</publishTime>
@@ -189,10 +189,10 @@
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>10/22/2021 13:46:37</publishTime>
      <publishTime>10/22/2021 15:00:38</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>10/22/2021 13:46:37</publishTime>
      <publishTime>10/22/2021 15:00:38</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
@@ -363,7 +363,7 @@
      <publishTime>08/06/2021 22:57:28</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>10/22/2021 13:46:48</publishTime>
      <publishTime>10/22/2021 15:01:44</publishTime>
    </File>
  </ItemGroup>
</Project>