郑永安
2023-09-19 69185134fcfaf913ea45f1255677225a2cc311a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?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.gk.hotwork.specialWork.repository.WorkApprovalItemStandInfoRepository" >
 
 
    <resultMap id="WorkApprovalItemStandInfo" type="com.gk.hotwork.specialWork.entity.WorkApprovalItemStandInfo">
        <result column="id"  property="id"/>
        <result column="work_apply_id"  property="workApplyId"/>
        <result column="type"  property="type"/>
        <result column="eid"  property="eid"/>
        <result column="dep_id"  property="depId"/>
        <result column="dep_name"  property="depName"/>
        <result column="min_val"  property="minVal"/>
        <result column="min_val_match_pattern"  property="minValMatchPattern"/>
        <result column="max_val"  property="maxVal"/>
        <result column="max_val_match_pattern"  property="maxValMatchPattern"/>
        <result column="title"  property="title"/>
    </resultMap>
 
    <insert id="insertBatch"
            parameterType="com.gk.hotwork.specialWork.entity.WorkApprovalItemStandInfo">
        insert
        into work_approval_item_stand
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,
            type,
            dep_id,
            dep_name,
            min_val,
            min_val_match_pattern,
            max_val,
            max_val_match_pattern,
            title,
            work_apply_id
        </trim>
        <foreach collection="list" item="item"  separator=",">
            <trim prefix="(" suffix=")" suffixOverrides=",">
                #{item.id},
                #{item.type},
                #{item.depId},
                #{item.depName},
                #{item.minVal},
                #{item.minValMatchPattern},
                #{item.maxVal},
                #{item.maxValMatchPattern},
                #{item.title},
                #{item.workApplyId}
            </trim>
 
        </foreach>
 
    </insert>
    <select id="listWorkApprovalItemStandByWorkApplyId"
            parameterType="long"
            resultMap="WorkApprovalItemStandInfo">
        select
        itemStand.id,
        itemStand.type,
        itemStand.dep_id,
        itemStand.dep_name,
        itemStand.min_val,
        itemStand.min_val_match_pattern,
        itemStand.max_val,
        itemStand.max_val_match_pattern,
        itemStand.title,
        itemStand.work_apply_id
        from work_approval_item_stand as itemStand
        where itemStand.work_apply_id = #{workApplyId}
 
 
    </select>
</mapper>