| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.gkhy.exam.system.mapper.InternalAuditCarryMapper"> |
| | | <insert id="insertCarryDept"> |
| | | INSERT INTO`internal_audit_carry_dept` (`carry_id`, `dept_id`, `date`, `time`, `check_id` ) |
| | | INSERT INTO`internal_audit_carry_dept` (`carry_id`, `dept_id`,`date`, `start_time`, `end_time`, `check_id` ) |
| | | VALUES |
| | | <foreach collection="deptList" separator="," item="item"> |
| | | ( #{item.carryId}, #{item.deptId}, #{item.date}, #{item.time}, #{item.checkId} ) |
| | | ( #{item.carryId}, #{item.deptId},#{item.date}, #{item.startTime}, #{item.endTime}, #{item.checkId} ) |
| | | </foreach> |
| | | </insert> |
| | | <delete id="deletedCarryDeptByCarryId"> |
| | |
| | | <if test="companyId!=null and companyId!=''"> |
| | | and iac.company_id = #{companyId} |
| | | </if> |
| | | <if test="year!=null and year!=''"> |
| | | and iac.year = #{year} |
| | | </if> |
| | | ORDER BY iac.create_time ASC |
| | | </select> |
| | | <select id="selectCarryDeptList" resultType="com.gkhy.exam.system.domain.InternalAuditCarryDept"> |
| | |
| | | iacd.`dept_id`, |
| | | sd.dept_name, |
| | | iacd.`date`, |
| | | iacd.`time`, |
| | | iacd.`start_time`, |
| | | iacd.`end_time`, |
| | | iacd.`check_id` , |
| | | su.`name` as check_name |
| | | IFNULL(GROUP_CONCAT(DISTINCT es.`name` SEPARATOR ','), '') AS check_name |
| | | FROM |
| | | internal_audit_carry_dept iacd |
| | | LEFT JOIN sys_user su on iacd.check_id = su.id |
| | | left join sys_dept sd on iacd.dept_id = sd.dept_id |
| | | LEFT JOIN ex_student es ON FIND_IN_SET(es.`id`, iacd.`check_id`) |
| | | WHERE iacd.carry_id = #{carryId} |
| | | GROUP BY iacd.`id`; |
| | | </select> |
| | | </mapper> |