/// <summary>
        /// Entity转Model
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        private V_tm_pm_department  EntityToModel(tm_pm_department  entity)
        {
            if (entity != null)
            {
                V_tm_pm_department  model = new V_tm_pm_department ()
                {
                                       	DEPARTMENTID = entity.DEPARTMENTID,
                                        	FATHERTYPE = entity.FATHERTYPE,
                                        	FATHERID = entity.FATHERID,
                                        	COMPANYID = entity.COMPANYID,
                                        	DEPNAME = entity.DEPNAME,
                                        	DEPARTMENTBOSSHEAD = entity.DEPARTMENTBOSSHEAD,
                                        	DEPARTMENTDICTIONARYID = entity.DEPARTMENTDICTIONARYID,
                                        	DEPARTMENTFUNCTION = entity.DEPARTMENTFUNCTION,
                                        	CHECKSTATE = entity.CHECKSTATE,
                                        	EDITSTATE = entity.EDITSTATE,
                                        	CREATEUSERID = entity.CREATEUSERID,
                                        	CREATEDATE = entity.CREATEDATE,
                                        	UPDATEUSERID = entity.UPDATEUSERID,
                                        	UPDATEDATE = entity.UPDATEDATE,
                                        	CREATEPOSTID = entity.CREATEPOSTID,
                                        	CREATEDEPARTMENTID = entity.CREATEDEPARTMENTID,
                                        	CREATECOMPANYID = entity.CREATECOMPANYID,
                                        	OWNERID = entity.OWNERID,
                                        	OWNERPOSTID = entity.OWNERPOSTID,
                                        	OWNERDEPARTMENTID = entity.OWNERDEPARTMENTID,
                                        	OWNERCOMPANYID = entity.OWNERCOMPANYID,
                                    };

                return model;
            }

            return null;
        }
        /// <summary>
        /// Model转Entity
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        private tm_pm_department ModelToEntity(V_tm_pm_department model)
        {
            if (model != null)
            {
                tm_pm_department entity = new tm_pm_department()
                {
                	                    	DEPARTMENTID = model.DEPARTMENTID,
                                        	FATHERTYPE = model.FATHERTYPE,
                                        	FATHERID = model.FATHERID,
                                        	COMPANYID = model.COMPANYID,
                                        	DEPNAME = model.DEPNAME,
                                        	DEPARTMENTBOSSHEAD = model.DEPARTMENTBOSSHEAD,
                                        	DEPARTMENTDICTIONARYID = model.DEPARTMENTDICTIONARYID,
                                        	DEPARTMENTFUNCTION = model.DEPARTMENTFUNCTION,
                                        	CHECKSTATE = model.CHECKSTATE,
                                        	EDITSTATE = model.EDITSTATE,
                                        	CREATEUSERID = model.CREATEUSERID,
                                        	CREATEDATE = model.CREATEDATE,
                                        	UPDATEUSERID = model.UPDATEUSERID,
                                        	UPDATEDATE = model.UPDATEDATE,
                                        	CREATEPOSTID = model.CREATEPOSTID,
                                        	CREATEDEPARTMENTID = model.CREATEDEPARTMENTID,
                                        	CREATECOMPANYID = model.CREATECOMPANYID,
                                        	OWNERID = model.OWNERID,
                                        	OWNERPOSTID = model.OWNERPOSTID,
                                        	OWNERDEPARTMENTID = model.OWNERDEPARTMENTID,
                                        	OWNERCOMPANYID = model.OWNERCOMPANYID,
                                    };

                return entity;
            }
            return null;
        }