<?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.thhy.materials.modules.biz.pipeplan.mapper.TPipeInfoMapper">
|
<resultMap id="BaseResultMap" type="com.thhy.materials.modules.biz.pipeplan.entity.TPipeInfo">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
This element was generated on Wed May 10 18:27:25 CST 2023.
|
-->
|
<id column="pipe_id" jdbcType="VARCHAR" property="pipeId" />
|
<result column="ring_num" jdbcType="VARCHAR" property="ringNum" />
|
<result column="pipe_num" jdbcType="VARCHAR" property="pipeNum" />
|
<result column="turn" jdbcType="VARCHAR" property="turn" />
|
<result column="size" jdbcType="VARCHAR" property="size" />
|
<result column="reinforcement" jdbcType="VARCHAR" property="reinforcement" />
|
<result column="grouting_holes" jdbcType="VARCHAR" property="groutingHoles" />
|
<result column="block_num" jdbcType="VARCHAR" property="blockNum" />
|
<result column="produce_number" jdbcType="VARCHAR" property="produceNumber" />
|
<result column="mod_id" jdbcType="VARCHAR" property="modId" />
|
<result column="pouring_time" jdbcType="TIMESTAMP" property="pouringTime" />
|
<result column="into_mod_time" jdbcType="TIMESTAMP" property="intoModTime" />
|
<result column="check_user" jdbcType="VARCHAR" property="checkUser" />
|
<result column="check_time" jdbcType="TIMESTAMP" property="checkTime" />
|
<result column="pro_id" jdbcType="VARCHAR" property="proId" />
|
<result column="into_mod_user" jdbcType="VARCHAR" property="intoModUser" />
|
<result column="check_result" jdbcType="INTEGER" property="checkResult" />
|
</resultMap>
|
|
<select id="printPlanList" resultType="com.thhy.materials.modules.biz.pipeplan.entity.TPipeInfo">
|
SELECT
|
tpi.pro_id AS proId,
|
tpi.ring_num AS ringNum,
|
tpi.pipe_num AS pipeNum,
|
sp.pro_name AS proName,
|
sd.dict_name AS sizeName,
|
sd1.dict_name AS groutingName,
|
sd2.dict_name as reinforcementName,
|
sd3.dict_name as turnName,
|
sd4.dict_name as blockNumName,
|
tpi.into_mod_time as intoModTime,
|
tpi.pouring_time as pouringTime,
|
sm.mould_num as mouldNum,
|
tpi.pipe_id as pipeId
|
FROM
|
t_pipe_info tpi
|
LEFT JOIN sys_project sp ON tpi.pro_id = sp.pro_id
|
LEFT JOIN sys_dict sd ON tpi.size = sd.dict_id
|
LEFT JOIN sys_dict sd1 ON tpi.grouting_holes = sd1.dict_id
|
LEFT JOIN sys_dict sd2 ON tpi.reinforcement = sd2.dict_id
|
LEFT JOIN sys_dict sd3 ON tpi.turn = sd3.dict_id
|
LEFT JOIN sys_dict sd4 ON tpi.block_num = sd4.dict_id
|
left join sys_mould sm on tpi.mod_id=sm.mould_id
|
where 1=1
|
<if test="proId!=null and proId!='' ">
|
and sp.pro_id=#{proId}
|
</if>
|
<if test="companyId!=null and companyId!='' ">
|
and sp.company_id=#{companyId}
|
</if>
|
<if test="newTime!=null and newTime!='' ">
|
and tpi.into_mod_time like concat('%',#{newTime},'%')
|
</if>
|
<if test="ringNum!=null and ringNum!='' ">
|
and tpi.ring_num like concat('%',#{ringNum},'%')
|
</if>
|
order by tpi.into_mod_time desc
|
</select>
|
<insert id="pipeRecordInsert">
|
insert into t_pipe_record
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
id,
|
</if>
|
<if test="pipeId != null">
|
pipe_id,
|
</if>
|
<if test="createTime != null">
|
create_time,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
#{id,jdbcType=VARCHAR},
|
</if>
|
<if test="pipeId != null">
|
#{pipeId,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
</trim>
|
</insert>
|
<select id="printRecordList" resultType="com.thhy.materials.modules.biz.pipeplan.entity.TPipeInfo">
|
SELECT
|
tpi.pro_id AS proId,
|
tpi.ring_num AS ringNum,
|
tpi.pipe_num AS pipeNum,
|
sp.pro_name AS proName,
|
sd.dict_name AS sizeName,
|
sd1.dict_name AS groutingName,
|
sd2.dict_name as reinforcementName,
|
sd3.dict_name as turnName,
|
sd4.dict_name as blockNumName,
|
tpi.into_mod_time as intoModTime,
|
tpi.pouring_time as pouringTime,
|
sm.mould_num as mouldNum,
|
tpc.create_time as createTime
|
FROM
|
t_pipe_record tpc LEFT JOIN
|
t_pipe_info tpi ON tpc.pipe_id=tpi.pipe_id
|
LEFT JOIN sys_project sp ON tpi.pro_id = sp.pro_id
|
LEFT JOIN sys_dict sd ON tpi.size = sd.dict_id
|
LEFT JOIN sys_dict sd1 ON tpi.grouting_holes = sd1.dict_id
|
LEFT JOIN sys_dict sd2 ON tpi.reinforcement = sd2.dict_id
|
LEFT JOIN sys_dict sd3 ON tpi.turn = sd3.dict_id
|
LEFT JOIN sys_dict sd4 ON tpi.block_num = sd4.dict_id
|
left join sys_mould sm on tpi.mod_id=sm.mould_id
|
where 1=1
|
<if test="proId!=null and proId!='' ">
|
and sp.pro_id=#{proId}
|
</if>
|
<if test="companyId!=null and companyId!='' ">
|
and sp.company_id=#{companyId}
|
</if>
|
order by tpi.into_mod_time desc
|
</select>
|
</mapper>
|