chenlu
2024-03-15 dbec8a881baf27254a13f1f9c7b0167b9f064ab5
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
<?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.example.erp.mapper.pp.BasicDateProduceMapper">
    <resultMap id="selectBasicDataProduce" type="com.example.erp.entity.pp.BasicDataProduce">
        <id column="id" property="id"/>
        <result column="basic_type" property="basicType"/>
        <result column="basic_name" property="basicName"/>
        <result column="basic_category" property="basicCategory"/>
 
 
        <result column="d_basic_type" property="basicData.basicType"/>
        <result column="d_basic_name" property="basicData.basicName"/>
        <result column="d_basic_category" property="basicData.basicCategory"/>
 
 
 
    </resultMap>
    <select id="SelectWorkBasicDeviceMp">
        select
            *
        from
            basic_data_produce as a
        where a.basic_category=#{process} and a.basic_type='设备'
    </select>
 
    <select id="SelectWorkBasicTeamsMp">
        select
            *
        from
            basic_data_produce as a
        where a.basic_category=#{process} and a.basic_type='班组'
    </select>
 
    <select id="SelectWorkBasicTeams"  resultMap="selectBasicDataProduce">
        select bdp.basic_name ,bd.basic_name as d_basic_name
        from pp.basic_data_produce bdp
                 left join sd.basic_data bd on bdp.basic_category = bd.id
        where bd.basic_name = #{process}
          and bdp.basic_type = "teamsgroups"
    </select>
</mapper>