yang_shj
2 years ago
3 changed files with 37 additions and 6 deletions
@ -0,0 +1,16 @@
|
||||
package com.hnac.hzims.safeproduct.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hnac.hzims.safeproduct.entity.CheckItemInstanceEntity; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* Created by Sam Huang 2022/5/6 8:23 |
||||
*/ |
||||
public interface CheckItemInstanceMapper extends BaseMapper<CheckItemInstanceEntity> { |
||||
|
||||
List<CheckItemInstanceEntity> getCheckItemInstanceByMonth(@Param("months") List<String> months, @Param("deptId") Long deptId); |
||||
|
||||
} |
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.safeproduct.mapper.CheckItemInstanceMapper"> |
||||
|
||||
|
||||
<select id="getCheckItemInstanceByMonth" resultType="com.hnac.hzims.safeproduct.entity.CheckItemInstanceEntity"> |
||||
SELECT * |
||||
FROM hzims_safe_check_item_instance t |
||||
WHERE t.IS_DELETED = 0 |
||||
AND t.CHECK_ID IN (SELECT id |
||||
FROM hzims_safe_check_month |
||||
WHERE IS_DELETED = 0 AND CREATE_DEPT = #{deptId} AND MONTH IN |
||||
<foreach item="item" index="index" collection="months" open="(" separator="," close=" )"> |
||||
#{item} |
||||
</foreach> |
||||
) |
||||
</select> |
||||
|
||||
|
||||
</mapper> |
Loading…
Reference in new issue