Ejemplo n.º 1
0
        /// <summary>
        /// 整改后 整改负责人的回复信息
        /// </summary>
        /// <param name="data"></param>
        /// <param name="y_id"></param>
        /// <returns></returns>
        public int ZhengGai(dynamic data, int y_id)
        {
            if (ReStatus(y_id) == 2)
            {//表单已闭环 不能修改
                return(100);
            }
            Entity.yhtable y   = yh.Value.SetData(data);
            string         sql = "update yhtable set y_zgdesc='" + y.y_zgdesc + "',y_zgtime=" + y.y_zgtime + ",y_zgimg='" + y.y_zgimg + "', " +
                                 "y_status=3 where y_id=" + y_id + " ";
            int i = help.Count(sql);

            ///////发送信息
            string sql2 = "select b.mobile from yhtable a " +
                          "left join user_detail b " +
                          "on a.y_usid = b.us_id where y_id = " + y_id;
            object objs = help.FirstRow(sql2);

            if (objs != null)
            {
                if (objs.ToString() != "")
                {
                    sendXinXi(objs.ToString(), "您收到了来自整改负责人的整改回复信息,请前往系统查看并确认!");
                }
            }
            return(i);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 整改确认
        /// </summary>
        /// <param name="data">确认说明,整改后图片,检查表单状态,确认人ID,确认时间</param>
        /// <param name="y_id"></param>
        /// <returns></returns>
        public int QueRen(dynamic data, int y_id)
        {
            if (ReStatus(y_id) == 2)
            {//表单已闭环 不能修改
                return(100);
            }
            Entity.yhtable y   = yh.Value.SetData(data);
            string         sql = "update yhtable set y_qrdesc='" + y.y_qrdesc + "',y_qrimg='" + y.y_qrimg + "',y_status=" + y.y_status + "," +
                                 "y_qruser="******",y_qrtime=" + y.y_qrtime + " " +
                                 "where y_id=" + y_id;

            return(help.Count(sql));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 修改检查单  只限检查人修改
        /// </summary>
        /// <param name="data"></param>
        /// <param name="y_id"></param>
        /// <returns></returns>
        public int JianChaUpdate(dynamic data, int y_id)
        {
            if (ReSign(y_id) == 2)
            {//领导已确认 不能修改
                return(100);
            }
            Entity.yhtable y   = yh.Value.SetData(data);
            string         sql = "update yhtable set y_name='" + y.y_name + "',y_body='" + y.y_body + "',y_area='" + y.y_area + "'," +
                                 "y_type='" + y.y_type + "',y_dengji=" + y.y_dengji + ",y_desc='" + y.y_desc + "',y_endtime=" + y.y_endtime + "," +
                                 "y_zguser="******",y_yaoqiu='" + y.y_yaoqiu + "',y_img1='" + y.y_img1 + "' " +
                                 "where y_id=" + y_id;

            return(help.Count(sql));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 创建检查表
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public int CreateYh(dynamic data)
        {
            Entity.yhtable y = yh.Value.SetData(data);
            ////获取编号
            string no  = SetNo(y.y_headid);
            string sql = "insert into yhtable values('" + y.y_name + "'," + y.y_createtime + ",'" + y.y_body + "','" + y.y_area + "'," +
                         "'" + y.y_type + "'," + y.y_dengji + ",'" + y.y_desc + "','" + y.y_img1 + "'," + y.y_endtime + "," + y.y_usid + "," + y.y_zguser + ",'" + y.y_yaoqiu + "', " +
                         "" + y.y_headuser + "," + y.y_headtype + ",'" + y.y_zgdesc + "',0,'" + y.y_qrdesc + "'," +
                         "'" + y.y_qrimg + "'," + y.y_status + "," + y.y_qruser + ",0," + y.y_headid + ",'" + no + "','')";

            string sql2 = "";

            if (y.y_headuser > 0)
            {//如果需要上级审批发信息给上级领导进行通知
                sql2 = "select mobile from user_detail where us_id=" + y.y_headuser;
                object objs = help.FirstRow(sql2);
                if (objs != null)
                {
                    if (objs.ToString() != "")
                    {
                        sendXinXi(objs.ToString(), "一个安全检查单需要您的审批,检查类型:" + y.y_type + "。详情请登录系统查看!");
                    }
                }
            }
            else  //需要上级审批 直接发信息给整改人
            {
                sql2 = "select mobile from user_detail where us_id=" + y.y_zguser;
                object objs = help.FirstRow(sql2);
                if (objs != null)
                {
                    if (objs.ToString() != "")
                    {
                        sendXinXi(objs.ToString(), "您收到一个检查整改通知单,检查类型:" + y.y_type + "。详情请登录系统查看并及时整改!");
                    }
                }
            }
            return(help.Count(sql));
        }