|
|
|
<?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.glxp.api.dao.inout.IoDestinyProcessDetailMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.inout.IoDestinyProcessDetailEntity">
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
<!--@Table io_destiny_process_detail-->
|
|
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
<result column="relId" jdbcType="BIGINT" property="relId" />
|
|
|
|
<result column="count" jdbcType="INTEGER" property="count" />
|
|
|
|
<result column="reCount" jdbcType="INTEGER" property="reCount" />
|
|
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
id, relId, `count`, reCount
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="filterDestinyProducts" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
|
|
|
|
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
|
|
|
|
SELECT
|
|
|
|
basic_udirel.*,
|
|
|
|
basic_products.id AS PRId,
|
|
|
|
basic_products.originUuid,
|
|
|
|
basic_products.nameCode,
|
|
|
|
basic_products.deviceRecordKey,
|
|
|
|
basic_products.bhzxxsbzsl,
|
|
|
|
basic_products.zxxsbzbhsydysl,
|
|
|
|
basic_products.bhxjcpbm,
|
|
|
|
basic_products.bzcj,
|
|
|
|
basic_products.cpmctymc,
|
|
|
|
basic_products.cplb,
|
|
|
|
basic_products.flbm,
|
|
|
|
basic_products.ggxh,
|
|
|
|
basic_products.qxlb,
|
|
|
|
basic_products.tyshxydm,
|
|
|
|
basic_products.ylqxzcrbarmc,
|
|
|
|
basic_products.zczbhhzbapzbh,
|
|
|
|
basic_products.ylqxzcrbarywmc,
|
|
|
|
basic_products.sydycpbs,
|
|
|
|
basic_products.sjcpbm,
|
|
|
|
basic_products.versionNumber,
|
|
|
|
basic_products.diType,
|
|
|
|
basic_products.ybbm,
|
|
|
|
basic_products.sptm,
|
|
|
|
basic_products.manufactory,
|
|
|
|
basic_products.measname,
|
|
|
|
basic_products.productType,
|
|
|
|
basic_products.spmc,
|
|
|
|
basic_products.cplx,
|
|
|
|
basic_products.hchzsb,
|
|
|
|
basic_products.cpdls,
|
|
|
|
io_destiny_process_detail.count as count,
|
|
|
|
io_destiny_process_detail.reCount as reCount,
|
|
|
|
io_destiny_process_detail.id as deId
|
|
|
|
FROM
|
|
|
|
basic_udirel
|
|
|
|
INNER JOIN basic_products ON basic_products.uuid = basic_udirel.uuid
|
|
|
|
INNER JOIN io_destiny_process_detail ON io_destiny_process_detail.relId = basic_udirel.id
|
|
|
|
<where>
|
|
|
|
<if test="diType != null">
|
|
|
|
AND basic_products.diType = #{diType}
|
|
|
|
</if>
|
|
|
|
<if test="cpmctymc != '' and cpmctymc != null">
|
|
|
|
AND basic_products.cpmctymc like concat('%', #{cpmctymc}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="billNo != '' and billNo != null">
|
|
|
|
AND io_destiny_process_detail.orderIdFk = #{billNo}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
group by io_destiny_process_detail.id
|
|
|
|
order by io_destiny_process_detail.updateTime asc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterDestinyProcess" parameterType="com.glxp.api.req.inout.IodestinyProcessRequest"
|
|
|
|
resultType="com.glxp.api.res.inout.IodestinyProcessResponse">
|
|
|
|
SELECT
|
|
|
|
i1.*,
|
|
|
|
a1.`name` AS invName,
|
|
|
|
au.userName AS updateName,
|
|
|
|
au2.userName AS createName
|
|
|
|
FROM
|
|
|
|
io_destiny_process i1
|
|
|
|
LEFT JOIN auth_warehouse a1 ON a1.`code` = i1.invCode
|
|
|
|
LEFT JOIN auth_user au ON au.id = i1.updateUser
|
|
|
|
LEFT JOIN auth_user au2 ON au2.id = i1.createUser
|
|
|
|
<where>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
order by i1.updateTime desc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|