| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.BasicDateProduceMapper"> |
| | | <select id="SelectWorkBasicDeviceMp"> |
| | | select |
| | | * |
| | | from |
| | | basic_data_produce as a |
| | | where a.basic_category=#{process} and a.basic_type='设备' |
| | | <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="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> |
| | | |
| | | <select id="SelectWorkBasicTeamsMp"> |
| | | select |
| | | * |
| | | from |
| | | basic_data_produce as a |
| | | where a.basic_category=#{process} and a.basic_type='班组' |
| | | <!-- 查询工序--> |
| | | <select id="selectProcessMp"> |
| | | select * from sd.basic_data where basic_type='product' and basic_category='process' |
| | | |
| | | </select> |
| | | |
| | | <select id="selectBasicMp"> |
| | | select bdp.id, bdp.basic_type, 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 |
| | | order by bdp.id desc |
| | | </select> |
| | | |
| | | <select id="openSelectIdMp"> |
| | | select bdp.id, bdp.basic_type, 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 bdp.id = #{id} |
| | | </select> |
| | | |
| | | <delete id="deleteBasicMp"> |
| | | delete from pp.basic_data_produce where id = #{id} |
| | | </delete> |
| | | |
| | | <update id="updateBasicMp"> |
| | | update pp.basic_data_produce set basic_type = #{type},basic_name = #{name},basic_category = #{basicId} where id = #{id} |
| | | </update> |
| | | |
| | | <select id="getBasicData"> |
| | | select id from sd.basic_data where basic_category = 'process' and basic_name = #{process} |
| | | </select> |
| | | |
| | | <insert id="addTeamGroupMp"> |
| | | insert into pp.basic_data_produce(basic_type,basic_name,basic_category,create_time) |
| | | values('teamsgroups',#{basicName},#{basicId},now()) |
| | | </insert> |
| | | |
| | | <insert id="saveBreakageTypeMp"> |
| | | insert into pp.basic_data_produce(basic_type,basic_name,create_time) |
| | | values('breakagetype',#{basicName},now()) |
| | | </insert> |
| | | |
| | | <insert id="saveBreakageReasonMp"> |
| | | insert into pp.basic_data_produce(basic_type,basic_name,create_time) |
| | | values('breakagereason',#{basicName},now()) |
| | | </insert> |
| | | </mapper> |