| | |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.aftersalesservice.pojo.AfterSalesNearExpiry"> |
| | | select * from after_sales_near_expiry |
| | | where 1 = 1 |
| | | <where> |
| | | <if test="req.expireDate != null"> |
| | | AND expire_date = #{req.expireDate} |
| | | </if> |
| | |
| | | <if test="req.status != null"> |
| | | AND status = #{req.status} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | |
| | | <if test="req.serviceType != null"> |
| | | and service_type = #{req.serviceType} |
| | | </if> |
| | | order by update_time desc |
| | | order by create_time desc |
| | | </select> |
| | | <select id="countAfterSalesService" resultType="com.ruoyi.aftersalesservice.dto.CountDto"> |
| | | select |
| | |
| | | and ai.applicant_name = #{ew.applicantName} |
| | | </if> |
| | | </where> |
| | | order by ai.id desc |
| | | order by ai.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and create_time <= #{ew.createTimeEnd} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and en.create_time between #{enterpriseNewsDto.createTimeStart} and #{enterpriseNewsDto.createTimeEnd} |
| | | </if> |
| | | </where> |
| | | order by en.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and n.status = #{ew.status} |
| | | </if> |
| | | </where> |
| | | order by n.id desc |
| | | order by n.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | from sales_ledger sl |
| | | left join purchase_ledger pl on sl.id = pl.sales_ledger_id |
| | | left join customer c on sl.customer_id = c.id |
| | | where 1=1 |
| | | <where> |
| | | <if test="customerName != null and customerName != '' "> |
| | | and c.customer_name like concat('%',#{customerName},'%') |
| | | </if> |
| | | </where> |
| | | order by sl.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="c.staffName != null and c.staffName != '' "> |
| | | AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%') |
| | | </if> |
| | | order by staff_leave.id desc |
| | | order by staff_leave.create_time desc |
| | | </select> |
| | | <select id="staffLeaveList" resultType="com.ruoyi.staff.dto.StaffLeaveDto"> |
| | | SELECT |
| | |
| | | sys_post sp ON sp.post_id = soj.sys_post_id |
| | | LEFT JOIN |
| | | sys_dept sd ON sd.dept_id = soj.sys_dept_id |
| | | where 1=1 |
| | | <where> |
| | | <if test="c.staffName != null and c.staffName != '' "> |
| | | AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%') |
| | | </if> |
| | | </where> |
| | | order by staff_leave.create_time desc |
| | | </select> |
| | | |
| | | <select id="staffLeaveReasonAnalytics" resultType="com.ruoyi.staff.dto.StaffLeaveDto"> |
| | |
| | | <if test="staffOnJob.contractStartTime != null"> |
| | | HAVING MIN(t1.contract_start_time) = #{staffOnJob.contractStartTime} |
| | | </if> |
| | | order by staff_on_job.id desc |
| | | order by staff_on_job.create_time desc |
| | | </select> |
| | | <select id="staffOnJobList" resultType="com.ruoyi.staff.dto.StaffOnJobDto"> |
| | | SELECT |
| | |
| | | sys_post sp ON sp.post_id = staff_on_job.sys_post_id |
| | | LEFT JOIN |
| | | sys_dept sd ON sd.dept_id = staff_on_job.sys_dept_id |
| | | where 1=1 |
| | | <where> |
| | | <if test="staffOnJob.staffState != null"> |
| | | AND staff_state = #{staffOnJob.staffState} |
| | | </if> |
| | | <if test="staffOnJob.staffName != null and staffOnJob.staffName != '' "> |
| | | AND staff_name LIKE CONCAT('%',#{staffOnJob.staffName},'%') |
| | | </if> |
| | | </where> |
| | | order by staff_on_job.create_time desc |
| | | </select> |
| | | <!-- 统计指定日期的在职员工数 --> |
| | | <select id="countOnJobStaffByDate" resultType="java.lang.Integer"> |
| | |
| | | <sql id="selectDeptVo"> |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time |
| | | from sys_dept d |
| | | order by d.create_time desc |
| | | </sql> |
| | | |
| | | <select id="selectDeptList" parameterType="com.ruoyi.project.system.domain.SysDept" resultMap="SysDeptResult"> |
| | |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | group by d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time |
| | | order by d.parent_id, d.order_num |
| | | order by d.parent_id asc, d.order_num asc, d.create_time desc |
| | | </select> |
| | | |
| | | <select id="selectDeptListByRoleId" resultType="java.lang.Long"> |
| | |
| | | <if test="deptCheckStrictly"> |
| | | and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId}) |
| | | </if> |
| | | order by d.parent_id, d.order_num |
| | | order by d.parent_id asc, d.order_num asc, d.create_time desc |
| | | </select> |
| | | |
| | | <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> |
| | |
| | | d.dept_nick |
| | | from sys_dept d |
| | | where d.dept_id = #{deptId} |
| | | order by d.create_time desc |
| | | </select> |
| | | |
| | | <select id="checkDeptExistUser" parameterType="Long" resultType="int"> |
| | |
| | | and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectDictTypeAll" resultMap="SysDictTypeResult"> |
| | |
| | | AND post_name like concat('%', #{postName}, '%') |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectPostAll" resultMap="SysPostResult"> |
| | |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | |
| | | <select id="selectAllocatedList" parameterType="com.ruoyi.project.system.domain.SysUser" resultMap="SysUserResult"> |
| | |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | |
| | | <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.user_name = #{userName} and u.del_flag = '0' |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | |
| | | <select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.user_id = #{userId} |
| | | and u.del_flag = '0' |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | |
| | | <select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult"> |
| | |
| | | </if> |
| | | and u.del_flag = '0' |
| | | </where> |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | <select id="selectRegistrantIds" resultType="com.ruoyi.project.system.domain.SysUser"> |
| | | SELECT user_id, nick_name FROM sys_user |
| | |
| | | 1=0 <!-- 空列表时返回空结果 --> |
| | | </if> |
| | | </where> |
| | | ORDER BY sys_user.create_time DESC |
| | | </select> |
| | | <select id="selectUsersByIds" resultType="com.ruoyi.project.system.domain.SysUser"> |
| | | SELECT user_id, nick_name |
| | |
| | | #{id} |
| | | </foreach> |
| | | and del_flag = '0' |
| | | ORDER BY sys_user.create_time DESC |
| | | </select> |
| | | <select id="selectUserByNickName" resultType="com.ruoyi.project.system.domain.SysUser" |
| | | parameterType="java.lang.String"> |
| | |
| | | and sr.status = '0' |
| | | and su.status = '0' |
| | | and su.del_flag = '0' |
| | | ORDER BY su.create_time DESC |
| | | </select> |
| | | <select id="getUserByPerms" resultType="java.lang.Long"> |
| | | select distinct t5.user_id |