Esempio n. 1
0
 /// <summary>
 /// 保存表单(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="entity">实体对象</param>
 /// <returns></returns>
 public void SaveForm(string keyValue, SafetyworkfeedbackEntity entity)
 {
     try
     {
         service.SaveForm(keyValue, entity);
         SafetyworksuperviseBLL announRes = new SafetyworksuperviseBLL();
         var        sl         = announRes.GetEntity(entity.SuperviseId);
         UserBLL    userbll    = new UserBLL();
         UserEntity userEntity = userbll.GetEntity(sl.SupervisePersonId);//获取督办人用户信息
         JPushApi.PushMessage(userEntity.Account, sl.SupervisePerson, "GZDB002", "例行安全工作", sl.Id);
     }
     catch (Exception)
     {
         throw;
     }
 }
        /// <summary>
        /// 保存表单(新增、修改)
        /// </summary>
        /// <param name="keyValue">主键值</param>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        public void SaveForm(string keyValue, SuperviseconfirmationEntity entity)
        {
            try
            {
                service.SaveForm(keyValue, entity);

                SafetyworksuperviseBLL announRes = new SafetyworksuperviseBLL();
                var     sl      = announRes.GetEntity(entity.SuperviseId);
                UserBLL userbll = new UserBLL();
                //判断是督办完成还是退回
                if (entity.SuperviseResult == "1")                              //退回
                {
                    UserEntity userEntity = userbll.GetEntity(sl.DutyPersonId); //获取责任人用户信息
                    JPushApi.PushMessage(userEntity.Account, sl.DutyPerson, "GZDB003", "例行安全工作", sl.Id);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }